package com.example.sxt_practise.reflection;

import java.lang.reflect.Field;

/**
 * @author gaofeng
 * date 2022年02月27日 19:32
 */
public class Test {
    public static void main(String[] args) throws ClassNotFoundException {
        Class aClass = Class.forName("Student");

        Student stu = new Student() ;
        stu.getClazz() ;

        Class<Student> stuClass = Student.class;
        System.out.println(aClass);

        Field[] declaredFields = aClass.getClass().getDeclaredFields();
        Class<Integer> type = Integer.TYPE;

        Class<Void> voidClass = void.class;
        int[] a = new int[10] ;
        int[][] arr = new int[10][3] ;
        String[] b = new String[10] ;
        // 基本数据类型的包装类可已天通过此方式
        Class c = Integer.TYPE;
        System.out.println(a.getClass().hashCode() == arr.getClass().hashCode());
        System.out.println(a.getClass().hashCode() == b.getClass().hashCode());

    }
}
